package com.yl.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author lfs
 * @since 2021-01-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TShopCoupon extends Model<TShopCoupon> {

    private static final long serialVersionUID = 1L;

    @TableId("COUPON_ID")
    private Long couponId;

    @TableField("COUPON_NAME")
    private String couponName;

    /**
     * 0-店铺优惠券   1-商品优惠券 2-分类优惠券 9-平台优惠券
     */
    @TableField("COUPON_CLASS")
    private Integer couponClass;

    /**
     * 0-满减券，1-现金券，2-折扣券， 3-新人券
     */
    @TableField("COUPON_TYPE")
    private Integer couponType;

    @TableField("START_DATE")
    private LocalDateTime startDate;

    @TableField("END_DATE")
    private LocalDateTime endDate;

    @TableField("DISCOUNT_AMOUNT")
    private BigDecimal discountAmount;

    @TableField("THRESHOLD")
    private BigDecimal threshold;

    @TableField("CURRENT_USAGE")
    private Long currentUsage;

    @TableField("LIMIT_PER_PERSON")
    private Integer limitPerPerson;

    @TableField("PRINT_TIME")
    private LocalDateTime printTime;

    @TableField("SHOP_ID")
    private Long shopId;

    @TableField("SHOP_ITEM_ID")
    private Long shopItemId;

    /**
     * 1-有效，0-无效
     */
    @TableField("PRINT_AVAILABLE")
    private Integer printAvailable;


    @Override
    protected Serializable pkVal() {
        return this.couponId;
    }

}
